{include 'header.tpl'}
<ol class="breadcrumb">
    <li><a href="/Shop/list">列表</a></li>
</ol>
<form method="get" action="/Shop/productList" class="form-inline">
    <table>
        <tr>
            <td>
                <label for="form-w" class="control-label">商品id：</label>
                <input class="form-control" id="gid" name="gid" value="{$smarty.get.gid}" placeholder="" size="6"/>
            </td>

            <td>
                <label for="form-w" class="control-label">商品名称：</label>
                <input class="form-control" id="title" name="title" value="{$smarty.get.title}" placeholder="" size="6"/>
            </td>


            <td>
                <button type="submit" class="btn btn-primary">查找</button>
                <a href="/Shop/list" class="btn btn-danger">清空条件</a>
            </td>
        </tr>
    </table>
</form>
<div class="clearfix" style="height:30px;"></div>
<table class="table" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
    <tr>
        <td>ID</td>
        <td>商品</td>
        <td>库存</td>
        <td>原价</td>
        <td>现价</td>
        <td>成本价</td>
        <td>利润</td>
        <td>重量(g)</td>
        <td>状态</td>
        {*<td>操作</td>*}
    </tr>
    {foreach from=$data item=item}
        <tr>
            <td>{$item.pid}</td>
            <td>{$item.title}</td>
                {*{$tmp = json_decode($item.spec_list)}
                {foreach tmp as $v => $k}
                    {$k['value']}
                {/foreach}*}

            <td>{$item.num}</td>
            <td>{$item.price_old}</td>
            <td>{$item.price_new}</td>
            <td>{$item.purchase_price}</td>
            <td>{$item.profit}</td>
            <td>{$item.weight}</td>
            <td>
                <span style="color: #4cae4c">{if $item.pstatus eq 1}正常{/if}</span>
                <span style="color: #ff3b36">{if $item.pstatus eq -1}删除{/if}</span>
            </td>
            {*<td>*}
                {*<a href="/Shop/modify?id={$item.id}" rel="">修改</a>*}
                {*<a onclick="return confirm('确定要删除此域名？');" href="/Shop/del?id={$item.id}&status=-1"   >删除</a>*}
            {*</td>*}
        </tr>
    {/foreach}
</table>
{include "pager.tpl"}
<script type="text/javascript">
    $(function () {
        create_date_picker();
    });

    function dao(){
        var nickname = $('#nickname').val();
        var mobile = $('#mobile').val();
        var begin_date = $('#begin_date').val();
        var end_date = $('#end_date').val();
        var intentionE1=$("#intention option:selected");
        var intention = intentionE1.val();
//        alert(intention);
//        alert(nickname);
//        alert(mobile);
//        alert(end_date);

        location.href = "/admin/Order/excelDao?begin_date=" + begin_date + "&end_date=" + end_date+ "&nickname=" + nickname+ "&mobile=" + mobile + "&intention=" + intention;

    }
</script>
{include 'footer.tpl'}